#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int clock[4] = { 0,8,0,0 };
int main()
{
	int s, v, t;
	scanf("%d%d", &s, &v);
	if (s % v)t = s / v + 11;
	else t = s / v + 10;
	clock[3] -= t;
	while (clock[3] < 0) {
		clock[3] += 10;
		clock[2]--;
	}
	while (clock[2] < 0) {
		clock[2] += 6;
		clock[1]--;
	}
	while (clock[1] < 0) {
		clock[1] += 12;
	}
	if (clock[1] >= 10)printf("%d:%d%d", clock[1], clock[2], clock[3]);
	else printf("%d%d:%d%d", clock[0], clock[1], clock[2], clock[3]);
	return 0;
}